package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 租户资源表 实体类
 * 表名：haifan_tenant_resource
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "haifan_tenant_resource")
public class HaifanTenantResource implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 租户ID
     */
    @Column(name = "tenant_id", nullable = false)
    private Long tenantId;
    
    /**
     * 资源ID
     */
    @Column(name = "resource_id", nullable = false)
    private Long resourceId;
    
    /**
     * 限定数量
     */
    @Column(name = "resource_count", nullable = false)
    private Integer resourceCount;
    
    /**
     * 已使用的ID字符串,逗号分割
     */
    @Column(name = "used_ids", nullable = false, length = 1000)
    private String usedIds;
    
    @Override
    public String toString() {
        return "HaifanTenantResource{" +
            "id=" + id +
            ", tenantId=" + tenantId +
            ", resourceId=" + resourceId +
            ", resourceCount=" + resourceCount +
            ", usedIds=" + usedIds +
        '}';
    }
} 